1361
14855
scusatemi ragazzi voglio chiedere è perché sì perché improvvisamente argomento non valido fornito per foreach () CodeIgniter quando ho provato benerin ma comunque ancora così ..
Inizialmente volevo creare un annidabile in CodeIgniter ..
e questo è un esempio del mio script nel controller
funzione load_menus () {
$ this-> load-> model ("webadmin / we_model");
$ data ["menu"] = $ this-> me ($ this-> we_model-> get_menus ());
$ this-> load-> view ("webadmin / loadmenu.php", $ data);
}
funzione privata me ($ menu = array ()) {
$ html = '';
// Crea tutti i menu dell'applicazione in un formato ad albero
foreach ($ menu come $ menu)
{
// Controlla se questo menu ha figli
$ count_menu_children = count (get_value ($ menu, 'children'));
// Crea un menu a riga singola
$ html. = '
  • '; $ html. = '
    '; $ html. = '
    '; $ class = get_value ($ menu, 'dtt_inative')! = ''? "errore di testo": ""; $ label = get_value ($ menu, 'url_img') == '' && get_value ($ menu, 'label') == ''? '[NO NAME]': lang (get_value ($ menu, 'label')); $ html. = ''. $ label. ""; $ html. = ''; $ html. = '